import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken(cb) {
   Cookies.remove(TokenKey) 
   cb && cb()
}



export const getStorage = (key='') =>{
    return Cookies.get(key)
}

export function setStorage(key='',value) {
    return Cookies.set(key, value)
  }
  
  export function removeStorage(key='',cb) {
     Cookies.remove(key) 
     cb && cb()
  }